home *** CD-ROM | disk | FTP | other *** search
/ MacWorld 1999 August / Macworld (1999-08).dmg / From Macworld Readers / FREE Scripts / FREE Guides / FREE Guide Electronic Music / FREE Guide • Electronic M….sea / FREE Guide • Electronic Music.rsrc / TEXT_136.txt < prev    next >
Text File  |  1995-07-26  |  11KB  |  232 lines

  1.  
  2. Appendix C
  3.  
  4. An Introduction to MIDI
  5. qqqqqqqqqqqqqqqqqq
  6.  
  7.  
  8. The Musical Instrument Digital Interface (MIDI) provides a simple and reliable form of communication between synthesisers, sequencers and other devices. It avoids audio interference, uses domestic connectors and works with low cost equipment. A deep understanding of coding details is unnecessary for the user. 
  9.  
  10.  
  11. MIDI can connect a master keyboard to a sequencer and, in turn, instruments  such as synthesisers, samplers, mixers or effects devices. The sequencer records and stores the keyboard performance ‚Äî any number of tracks  may be assigned to any voice in any instrument. Sequencers also provide editing, looping, tempo changing and synchronisation to timecode.
  12.  
  13. MIDI is similar to the familiar RS-232 interface used by many computers. It uses 8 bits without parity and operates at 31.25 kbits/s (¬±1%) ‚Äî around 3000 bytes per second. Interference is minimised by using a current loop to drive an opto-isolator at the receiver.
  14.  
  15. Data travels in only one direction and no handshaking is used ‚Äî the receiver has to accept the data. If handshaking is required (for example, when transferring audio samples between two devices) then separate MIDI cables are needed in both directions
  16.  
  17.  
  18. The Interface
  19. wwwwwww
  20.  
  21. All MIDI connections appear on 5 pole 180¬∞ DIN sockets ‚Äî pins 4 & 5 carry the data loop, which must not be reversed. Pin 2 provides a screen connection which is wired to earth at Output and Thru sockets only.
  22.  
  23.  
  24.  
  25.  
  26.  
  27.  
  28.  
  29.  
  30.  
  31.  
  32.  
  33.  
  34.  
  35.  
  36.  
  37.  
  38.  
  39.  
  40.  
  41.  
  42.  
  43.  
  44.  
  45.  
  46.  
  47.  
  48.  
  49.  
  50.  
  51.  
  52.  
  53.  
  54.  
  55.  
  56.  
  57.  
  58.  
  59.  
  60.  
  61. Within each device Pin 4 of the Output socket is connected to +5 volts via a resistor whilst pin 5 carries the data. At the destination these two wires are connected to an opto-isolator forming a 5 milli-amp (mA) loop circuit. This represents information by:-
  62.  
  63.                                                no current = idle or logical 1
  64.                                                current flowing = logical 0
  65.  
  66. Opto-isolators, although they eliminate problems with earthing and interference, often introduce erratic behaviour which is caused by timing errors. Devices which incorporate high speed opto-isolators may be more reliable.
  67.  
  68.  
  69. Cables and Connectors
  70. wwwwwwwwwww
  71.  
  72. Screened twisted-pair cable should be fitted with DIN plugs at both ends. Pin 2 should be joined to the cable screen, but not to the case of the plug.
  73.  
  74. Although pins 1 and 3 are ‚Äòspare‚Äô (some manufacturers use them) it is probably best to obtain MIDI cables that are pre-wired on all pins. Ready-made hi-fi cables are perfectly adequate ‚Äî special cables are not essential.
  75.  
  76. MIDI can be sent via XLR cables, using suitable adaptors, or even via jackfields which have 3 pole connectors. But ideally MIDI and audio are best kept separate. 
  77.  
  78. Cable lengths should not  exceed 15 metres since excessive cable capacitance will cause problems. Low capacitance cable may be used, but it is not  guaranteed to work. For really long distances MIDI/RS-422 and RS-422/MIDI converters should be used at each end of the circuit.
  79.  
  80. ‚Äû   MIDI circuits cannot be wired in parallel without compromising reliability 
  81.      ‚Äî a MIDI output can only feed one input.
  82.  
  83. ‚Äû   Accidental connections between two MIDI outputs will not cause any 
  84.      damage.
  85.  
  86. Thru Outputs  replicate the data at the input of a device. Hence you can ‚Äòchain‚Äô together up to three items ‚Äî any more than this will cause timing problems. If in doubt, a MIDI Thru Box will provide a reliable ‚Äòstar‚Äô distribution.
  87.  
  88. Two or more MIDI outputs can be sent to a common destination using a MIDI merger. This may be necessary when feeding MIDI timecode and a keyboard into a sequencer. One input or certain data will receive timing priority within the merger, so small timing delays should be expected!
  89.  
  90.  
  91.  
  92.  
  93.  
  94.  
  95.  
  96.  
  97.  
  98.  
  99.  
  100.  
  101.  
  102.  
  103.  
  104.  
  105.  
  106.  
  107.  
  108.  
  109.  
  110.  
  111.  
  112.  
  113.  
  114.  
  115.  
  116.  
  117.  
  118.  
  119.  
  120.  
  121.  
  122.  
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129.  
  130.  
  131. MIDI Messages
  132. wwwwwww
  133.  
  134. The codes used to carry information are defined in the MIDI Specification. How an instrument actually responds to these is given by the MIDI Implementation Chart provided with each product. 
  135.  
  136. System Exclusive messages are designed by manufacturers for editing or controlling specific instruments. The codes used for Sysex information is always made available ‚Äî but using the appropriate software is easiest!
  137.  
  138. The Patch Change message is one of the simplest ‚Äî it selects a preset mode, perhaps a certain synthesiser voice, for any device.
  139.  
  140. Note On and Off messages carry MIDI Channel Numbers. These enables particular instruments or voices, each assigned with the appropriate numbers, to be played when several devices are ‚Äòdaisy chained‚Äô together.
  141.  
  142. Timing information may also be sent, telling instruments which ‚Äòsong‚Äô a sequencer is playing and the position in that song. For relative timing each instrument uses a Song Position Pointer register to counts Timing Clocks, sent via MIDI at a rate of 96 clocks per whole note (semi-breve) as the sequencer runs. These are preceded by Song Select and Start messages which control the sequencer. The contents of the Song Position Pointer register can be sent via MIDI to recall any particular point in the sequence.
  143.  
  144. For absolute timing MIDI Timecode (MTC) carries time as hours, minutes, seconds and frames. This information is vital for a composer to fit music to an existing TV video recording.
  145.  
  146. MIDI can convey information from switches, foot pedals, or rotary controllers to 14-bit resolution ‚Äî hence a sequencer can be used to vary synthesiser settings or even to control an audio mixer. MIDI may then begin to struggle ‚Äî the density of data exceeding the ability of the interface. There are two options: either the transmitted data may be thinned, often causing no problems, or the receiving device may be programmed to do the job itself on receipt of a simple MIDI command.
  147.  
  148. ‚Äû   Certain equipment may only respond to some messages. You should refer 
  149.      to the Implementation Chart provided with each product. Further details of 
  150.      the actual codes used may be found in the MIDI Specification.
  151.  
  152. ‚Äû   Many sequencers programs use MIDI Files. These files contain only the 
  153.      MIDI data necessary to perform a sequence ‚Äî such as Note On, Note Off or 
  154.      MIDI clocks. They do not contain any information needed for the
  155.      particular sequencer program. Such files can be easily transferred between 
  156.      different applications.
  157.  
  158.  
  159. MIDI and Timecode
  160. wwwwwwwww
  161.  
  162. Many MIDI devices and sequencers can be ‚Äòslaved‚Äô to one or more of the various forms of timecode. Timecode indicates the time of day (when recording) or programme duration in hours, minutes, seconds and picture frames. The actual codes used within timecode are set down by the SMPTE.
  163.  
  164. For the NTSC (American) TV system there are 30 frames (or thereabouts) per second. For the PAL (European) system there are 25 per second. The full list of frame standards  is given below.
  165.  
  166.  
  167.  
  168.  
  169.  
  170.  
  171.  
  172.  
  173.  
  174.  
  175.  
  176.  
  177.  
  178.  
  179.  
  180.  
  181.  
  182.  
  183.  
  184. Timecode Formats
  185. wwwwwwwww
  186.  
  187. Timecode exists in several different forms, each suited to a particular application. 
  188.  
  189. MIDI timecode (MTC) is the most common timing reference for sequencer programs. A MIDI Full Frame message is sent when the source of timecode starts, stops or ‚Äòdrops out‚Äô. Quarter Frame messages are sent during continuous timecode.
  190. ‚Äû   Only the Full Frame message is System Exclusive ‚Äî this is important to 
  191.      remember when using software or devices which ‚Äòfilter‚Äô MIDI data.
  192.  
  193. Direct Time Lock (DTL) or Direct Time Lock enhanced (DTLe) are alternatives to MTC, much favoured by Mark Of The Unicorn. Although simpler than MTC it is highly reliable. It sends System Exclusive time data only at the start of a run of timecode. This is followed by System Exclusive up clocks or down clocks as timecode progresses.
  194.  
  195. Longitudinal timecode (LTC) uses modified bi-phase encoding to create an audio signal that can be recorded onto one track of a conventional tape machine, onto the linear tracks of a U-matic recorder or onto the Hi-Fi tracks of a VHS machine.
  196. ‚Äû   Some MIDI interfaces can convert LTC into MTC and insert it into a MIDI 
  197.      ‚Äòdata stream‚Äô.
  198. ‚Äû   The linear tracks of a VHS recorder (or the standard tracks of a Compact 
  199.      Cassette machine) employ substantial pre-emphasis ‚Äî so the results will 
  200.      not be reliable!
  201. ‚Äû   Timecode will be lost a low tape speeds ‚Äî or when a tape machine is
  202.      in pause or stop-frame modes. Most conventional tape machines will need 
  203.      to be modified in order to read timecode whilst spooling the tape. 
  204.  
  205. Vertical Interval Timecode (VITC) is recorded with the picture information onto a video recorder. A good quality video machine is essential ‚Äî a European VHS machine may give problems!
  206. A VITC reader is essential in order to extract timecode from the video signal. The output of the reader, usually in the form of LTC, can be used as normal.
  207.  ‚Äû   The continuous feed of timecode which may be produced in pause or
  208.       stop-frame modes may upset certain items of equipment.
  209. ‚Äû   An output of timecode is provided at all times ‚Äî except possibly at high 
  210.      spooling speeds. No timecode will be produced from a U-matic machine 
  211.      when the tape is disengaged from the video heads!
  212. ‚Äû   VITC is placed on pairs of designated lines within the video signal. Care 
  213.      must be taken to ensure that the VITC reader only accepts data from the
  214.      correct lines.
  215. ‚Äû   In some cases two sets of VITC lines may exist on the same recording. The 
  216.      first will be the original time of day of recording (which may be discontinuous 
  217.      as a result of editing). The second will be the programme duration. This 
  218.      should be continuously ascending timecode ‚Äî the only type suitable for 
  219.      sequencer control!
  220.  
  221. Digital Audio when conveyed via the professional AES/EBU Digital Interface has the potential to carry timecode within the audio ‚Äòdata stream‚Äô. Certain professional Digital Audio Tape (DAT) machines can also record timecode ‚Äî although they invariably use LTC for external connections.
  222.  
  223.  
  224. Using Timecode
  225. wwwwwwww
  226.  
  227. Setting a starting point of  00h 00m 00s 00f may upset some sequencers. In such cases it is advisable to choose a non-zero starting point, such as 10h 00m 00s 00f. This can usually be acheived by obtaining source material in which the timecode is recorded as time of day (rather than programme duration).
  228.  
  229. Timecode may incorporate User bits. These can be used to convey any data alongside the timecode ‚Äî a typical application might be ASCII text providing messages about the picture material. The User Bits in LTC may be extracted and converted into MTC User Bits by means of a suitable MIDI interface. However, insertion of User Bits into the original LTC signal will require special equipment.
  230.  
  231.  
  232. ¬©Ray White 1995. All Rights Reserved.